﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="add_test_detail_show.aspx.cs" Inherits="SQT.tracnghiem.Ajax.ASP.Certificate.add_test_detail_show" %>
<%@ Import Namespace ="DataAccess" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<body>
    <%
        int id = int.Parse(Request.QueryString["id"]);
        int thutu = int.Parse(Request.QueryString["thutu"]);
        var get_td = new TblTestDetailController().FetchAll().Where(x => x.TestId == id).Last();
         %>
    <li id="<%=get_td.TestDetailId %>" class="question w3-display-container w3-padding">
        <div class="ques_id w3-hide"><%=get_td.TestDetailId %></div>
        <div class="w3-row">
            <label class="w3-border-teal" style="border-bottom: 3px solid">Câu&nbsp;<span class="thutu"><%=thutu+1 %></span>:</label>&nbsp;<%=get_td.TestDetailQuestion %><br />
            <%if (get_td.TestDetailUrl != "")
              {%>
            <% string[] temp = new string[20];

               temp = get_td.TestDetailUrl.ToLower().Split('.');
               string tail = temp[temp.Length - 1];
               if (tail == "mp3" || tail == "wav")
               {
            %>
            <p>
                <audio src="../Content/Testdata/Audio/<%=get_td.TestDetailUrl %>" controls="controls" />
            </p>
            <%
           }
           else
           {
            %>
            <p>
                <img src="../Content/TestData/picture/<%=get_td.TestDetailUrl %>" style="width: 30%" />
            </p>
            <%
           }
          } %>
        </div>
        <span class="del_modal w3-closebtn w3-display-topright w3-padding-right">&times;</span>
    </li>
</body>
</html>
